/* 聊天页面样式 */
.chat-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.chat-page .flex {
  display: flex;
  width: 100%;
  height: 100%;
}

/* 侧边栏样式 */
.aside {
  width: 260px;
  height: 100%;
  background-color: #f7f7f8;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}

.aside.collapsed {
  width: 0;
  border: none;
}

.media-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.newChat {
  margin: 10px;
  padding: 10px;
  background-color: #7c3aed;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.3s;
  font-weight: 500;
}

.newChat:hover {
  background-color: #6d28d9;
}

.search-box {
  margin: 10px;
}

.search-input-container {
  display: flex;
  align-items: center;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px;
}

.search-icon {
  width: 16px;
  height: 16px;
  color: #666;
  margin-right: 8px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
}

.chat-list-container {
  flex: 1;
  overflow-y: auto;
}

.content {
  padding: 0 10px;
}

.chat-item {
  padding: 10px;
  margin: 5px 0;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.3s;
}

.chat-item:hover {
  background-color: #f0f0f0;
}

.chat-item.active {
  background-color: #f0f0ff;
}

.chat-item-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-actions {
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  gap: 5px;
}

.chat-item:hover .chat-item-actions {
  opacity: 1;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 10px;
}

.chat-list-item {
  display: flex;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 5px;
  position: relative;
}

.chat-list-item:hover {
  background-color: #f0f0f0;
}

.chat-list-item.active {
  background-color: #f0f0ff;
}

.chat-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.chat-title-input {
  flex: 1;
}

.chat-title-input-field {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 5px;
  font-size: 14px;
  outline: none;
}

.chat-opt {
  opacity: 0;
  transition: opacity 0.2s;
}

.chat-list-item:hover .chat-opt {
  opacity: 1;
}

.chat-title {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-title h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.chat-title-actions {
  display: flex;
  gap: 10px;
}

.chat-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 80%;
  margin: 0 auto;
}

.chat-prompt {
  display: flex;
  justify-content: flex-end;
}

.chat-prompt-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.chat-prompt-bubble {
  background-color: #f0f0ff;
  padding: 12px 16px;
  border-radius: 12px 12px 0 12px;
  max-width: 600px;
  word-break: break-word;
}

.chat-prompt-avatar, .chat-reply-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.chat-timestamp {
  font-size: 12px;
  color: #999;
  text-align: center;
  margin: 10px 0;
}

.chat-reply {
  display: flex;
  justify-content: flex-start;
}

.chat-reply-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.chat-reply-bubble {
  background-color: #f7f7f8;
  padding: 12px 16px;
  border-radius: 0 12px 12px 12px;
  max-width: 600px;
}

.chat-reply-bubble .markdown-body {
  background-color: transparent !important;
}

.chat-reply-bubble .markdown-body p {
  margin: 0;
}

.chat-reply-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: #999;
  font-size: 12px;
}

.chat-reply-actions button {
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
}

.chat-reply-actions button:hover {
  color: #6B50E1;
}

.chat-prompt {
  max-width: 100%;
  align-self: flex-end;
  background-color: transparent;
  border-radius: 0;
}

.chat-prompt-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.chat-prompt-avatar img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-prompt-info {
  display: flex;
  flex-direction: column;
}

.chat-prompt-name {
  font-weight: 500;
  font-size: 14px;
}

.chat-prompt-time {
  font-size: 12px;
  color: #666;
}

.chat-prompt-content {
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-prompt-model {
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  text-align: right;
}

.chat-reply {
  max-width: 80%;
  align-self: flex-start;
  background-color: #f7f7f8;
  border-radius: 12px 12px 12px 0;
  padding: 15px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-reply-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.chat-reply-avatar img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-reply-info {
  display: flex;
  flex-direction: column;
}

.chat-reply-name {
  font-weight: 500;
  font-size: 14px;
}

.chat-reply-time {
  font-size: 12px;
  color: #666;
}

.chat-reply-content {
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-reply-content code {
  background-color: #f0f0f0;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
}

.chat-reply-content pre {
  background-color: #f0f0f0;
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 10px 0;
}

.chat-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.action-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.action-button:hover {
  background-color: #f0f0f0;
}

.action-button .icon {
  width: 18px;
  height: 18px;
  color: #666;
}

.action-button .tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 5px;
}

.token-info {
  font-size: 12px;
  color: #666;
  display: flex;
  align-items: center;
}

.input-box {
  padding: 20px;
  background-color: #ffffff;
}

.input-box-inner {
  width: 80%;
  margin: 0 auto;
}

.input-body {
  position: relative;
}

.hide-div {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding: 15px;
  font-size: 14px;
  line-height: 1.5;
  width: 100%;
}

.input-border {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #f7f7f8;
}

.input-inner {
  padding: 15px;
}

.prompt-input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  font-family: inherit;
  background: transparent;
  min-height: 24px;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 10px 15px;
  background-color: transparent;
}

.flex {
  display: flex;
  align-items: center;
  justify-content: center;
}

.little-btns {
  gap: 10px;
}

.tool-item-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-item-btn:hover {
  background-color: #f0f0f0;
}

.send-btn {
  background: white;
  border: 1px solid #e0e0e0;
  color: #6B50E1;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.send-btn .icon {
  width: 18px;
  height: 18px;
}

.stop-btn {
  background: #e53e3e;
  border: none;
  color: #e53e3e;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-trigger {
  cursor: pointer;
  padding: 5px;
}

.icon {
  width: 16px;
  height: 16px;
  color: #666;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-width: 120px;
  z-index: 1000;
  display: none;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

.dropdown-item.delete:hover {
  color: #e53e3e;
}

.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dialog {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 400px;
  max-width: 90%;
}

.dialog-header {
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}

.dialog-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #666;
}

.dialog-body {
  padding: 20px 15px;
}

.dialog-footer {
  padding: 15px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-button {
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.dialog-button-secondary {
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
}

.dialog-button-primary {
  background-color: #7c3aed;
  color: white;
  border: none;
}

.dialog-button-danger {
  background-color: #e74c3c;
  color: white;
  border: none;
}

@media (max-width: 768px) {
  .aside {
    position: absolute;
    z-index: 10;
    background-color: white;
  }
  
  .chat-prompt, .chat-reply {
    max-width: 90%;
  }
}

.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 20px;
}

.welcome-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  text-align: center;
}

.welcome-container .title {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  margin-bottom: 40px;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.example-section {
  text-align: left;
}

.example-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.example-section-title svg {
  width: 20px;
  height: 20px;
}

.example-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.example-item {
  padding: 12px;
  background-color: #f7f7f8;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
}

.example-item:hover {
  background-color: #f0f0f0;
}

.welcome-actions {
  display: flex;
  gap: 15px;
}

.welcome-button {
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.welcome-button-primary {
  background-color: #7c3aed;
  color: white;
  border: none;
}

.welcome-button-secondary {
  background-color: #f5f5f5;
  border: 1px solid #e0e0e0;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #7c3aed;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.back-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: #7c3aed;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s;
}

.back-top:hover {
  background-color: #6d28d9;
}

.file-select {
  border: 2px dashed #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.file-select:hover {
  border-color: #7c3aed;
}

.file-select.dragging {
  border-color: #7c3aed;
  background-color: rgba(124, 58, 237, 0.05);
}

.file-select-icon {
  font-size: 30px;
  color: #666;
  margin-bottom: 10px;
}

.file-select-text {
  font-size: 14px;
  color: #666;
}

.file-select-text strong {
  color: #7c3aed;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.file-item {
  background-color: #f5f5f5;
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.file-item-icon {
  color: #666;
}

.file-item-name {
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  padding: 0;
  font-size: 16px;
}

.settings {
  padding: 20px;
}

.settings-group {
  margin-bottom: 20px;
}

.settings-group-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 10px;
}

.settings-item {
  margin-bottom: 15px;
}

.settings-item-label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.settings-item-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.settings-item-select {
  width: 100%;
  padding: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.settings-item-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 对话框样式 */
.notice-dialog, .conversation-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.notice-dialog-header, .conversation-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.notice-dialog-header h2, .conversation-dialog-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.notice-dialog-body, .conversation-dialog-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.notice-dialog-footer {
  padding: 15px 20px;
  border-top: 1px solid #e0e0e0;
  text-align: right;
}

.primary-btn {
  background-color: #7c3aed;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.primary-btn:hover {
  background-color: #6d28d9;
}

.tool-box {
  padding: 10px;
  border-top: 1px solid #e0e0e0;
}

.clear-btn {
  width: 100%;
  padding: 8px;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.clear-btn:hover {
  background-color: #d32f2f;
} 